package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.FpClientActivityUserDTO;
import com.financing.wap.dao.IFpClientActivityUserDao;
import com.financing.wap.common.SqlName;
/**
 * fp_client_activity_user  
 * 客户活动报名用户 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("fpClientActivityUserDao")
public class FpClientActivityUserDaoImpl extends BaseDaoImpl<FpClientActivityUserDTO, java.lang.Integer> implements IFpClientActivityUserDao {


	@Override
	public int insert(FpClientActivityUserDTO fpClientActivityUser) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.FpClientActivityUserSql.insert, fpClientActivityUser);
	}

	@Override
	public void update(FpClientActivityUserDTO fpClientActivityUser) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpClientActivityUserSql.update, fpClientActivityUser);
	}

	@Override
	public void updateForce(FpClientActivityUserDTO fpClientActivityUser) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpClientActivityUserSql.updateForce, fpClientActivityUser);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.FpClientActivityUserSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<FpClientActivityUserDTO> queryList(FpClientActivityUserDTO fpClientActivityUser) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.FpClientActivityUserSql.queryList, fpClientActivityUser);
	}

	@Override
	public int queryListCount(FpClientActivityUserDTO fpClientActivityUser) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.FpClientActivityUserSql.queryListCount, fpClientActivityUser);
	}

	@Override
	public FpClientActivityUserDTO loadById(Integer id) throws SQLException {
		return  (FpClientActivityUserDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.FpClientActivityUserSql.loadById,id);
	}

	@Override
	public Class<FpClientActivityUserDTO> getEntityClass() {
		return FpClientActivityUserDTO.class;
	}
 	
}
